package com.vineetska.contact.utils;

/**
 * @author vineet shukla
 * @email: vineetska@gmail.com
 * Nov 6, 2011
 */

import android.content.Context;
import android.content.Intent;
import android.net.Uri;

public class ProjectUtil {

	public static void processCallRequest(Context context, String contactNumber){
		Intent call = new Intent(Intent.ACTION_CALL);
		call.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
		call.setData(Uri.parse("tel:" + contactNumber));
		context.startActivity(call);
	}

	public static void openSmsScreen(Context context, String contactNumber){
		String uri= "smsto:" + contactNumber;
		Intent sendIntent = new Intent(Intent.ACTION_SENDTO, Uri.parse(uri));
		sendIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
		sendIntent.putExtra("compose_mode", true);
        context.startActivity(sendIntent);
	}



}
